home *** CD-ROM | disk | FTP | other *** search
- /*
- * hippoplotXIV.h - routines for producing X/InterViews displays.
- *
- * Copyright (C) 1991 The Board of Trustees of The Leland Stanford
- * Junior University. All Rights Reserved.
- *
- * $Header: /nfs/ebnextk/LocalSources/hippo/RCS/hippoplotXIV.h,v 1.4 1992/04/28 22:18:21 rensing Rel $
- *
- * Author : Tom Pavel
- * Created On : Thu Mar 21 19:28:14 1991
- * Last Modified By: Tom Pavel
- * Last Modified On: Fri Jan 3 15:55:27 1992
- * Update Count : 16
- * Status : Release 1
- */
-
-
-
- #ifndef _hippoplotXIV_h_
- #define _hippoplotXIV_h_
-
- #ifdef __cplusplus
- class Canvas;
- class Painter;
- #else
- typedef void Canvas;
- typedef void Painter;
- #endif
-
- #include "hippo.h" /* For structures and enums... */
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- /*
- * initPlot - specify the InterViews Painter and Canvas objects to be used
- * for drawing. This sets global values that are used by the other routines,
- * so it should be called whenever the information is changed (h_plot).
- */
- void initPlot_XIV(void* painter, void* canvas);
-
- /*
- * setHistoCoords - specify the inner rectangle (margin) in device coords
- * (points), and the inner rectangle again in user coords. This sets global
- * values that are used by the other routines, so it should be called
- * whenever any rectangle specification is changed. Note that the outer
- * rectangle (drawRect) is determined from the Canvas object, so we don't
- * pass that.
- */
- void setHistoCoords_XIV(rectangle* margin, rectangle* data);
-
- /*
- * Place text at a given location in device coords. X alignment is
- * specified as 'L', 'R', or 'C' (or lower case), meaning that the
- * left, right, or center of the text is positioned at the xy
- * location. Similarly Y alignment is given as 'B', 'C', or 'T', for
- * bottom, center or top. Rotation is then performed, given in
- * degrees anti-clockwise. The variable 'fontSize' is the size in
- * 'points', which is currently ignored.
- */
- void drawText_XIV(char *message,
- float x,
- float y,
- float fontHeight,
- float angle,
- char xalign,
- char yalign);
-
- /*
- * plot "x10^mag" at specified location
- */
- void drawMag_XIV(float x, float y,
- int mag,
- float fontsize);
-
- /*
- * draw ticks and labels along X axis
- */
- void drawXTicks_XIV(float* x,
- int nt,
- float tickwidth,
- int side);
-
- /*
- * draw ticks and labels along Y axis
- */
- void drawYTicks_XIV(float* y,
- int nt,
- float tickwidth,
- int side);
-
-
- /*
- * draw a rectangle using the supplied device coordinates (points).
- */
- void drawRect_XIV(float x, float y,
- float width, float height);
-
- /*
- * draw a filled rectangle using the supplied device coordinates (points).
- * The fill is determined by "grey" (0-1).
- */
- void drawFilledRect_XIV(float x, float y,
- float width, float height,
- float grey);
-
- /*
- * draw a shaded rectangle in data coordinates, using a 60% grey.
- */
- void shade_XIV(float xlow, float xhigh,
- float ylow, float yhigh );
-
- /*
- * Draw lines between coordinates
- */
- void drawLine_XIV(float *xy, int nxy,
- linestyle_t ls);
-
- /*
- * Draw a series of points, using the symbol specified
- */
- void drawPoints_XIV(float xy[],
- int nxy,
- int symbol,
- float symbolsize);
-
- /*
- * Draw horizontal error bars. We use only the y part of the
- * coordinates, plus the x-low and x-high pairs.
- */
- void drawXError_XIV(float xy[],
- float errs[],
- int npts);
-
- /*
- * Draw vertical error bars. We use only the x part of the
- * coordinates, plus the y-low and y-high pairs.
- */
- void drawYError_XIV(float xy[],
- float errs[],
- int npts);
-
- /*
- * greyscale/color 2D plot for the NeXT
- */
- void drawColor2D_XIV(int nXBins,
- int nYBins,
- float minBin,
- float maxBin,
- float bins[]);
-
- /*
- * 3D histogram. So far unimplemented.
- */
- void drawLego2D_XIV(int nXBins,
- int nYBins,
- float minBin,
- float maxBin,
- float bins[]);
-
- #ifdef __cplusplus
- }
- #endif
-
-
- #endif
-
-